package com.sk.weichat.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import java.util.List;

/**
 * 通用RecyclerView的适配器
 *
 * @param <T>
 */
public abstract class CommonRecyclerAdapter<T> extends BaseQuickAdapter<Object, BaseViewHolder> {

    public CommonRecyclerAdapter(int layoutResId, List data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder holder, Object item) {
        convert(holder, holder.getAdapterPosition() );
    }

    /**
     * 对外提供的方法
     */
    public abstract void convert(BaseViewHolder holder, int position);

}
